<?php

namespace app\manage\services;
use app\model\Log as LogModel;

class Log
{
    protected $model;

    public function __construct()
    {
        $this->model = new LogModel();
    }

    //查询分页数据
    public function getPageList($page, $limit, $where = []): array
    {
        return $this->model->where($where)
            ->order("id desc")
            ->paginate(['page' => $page, 'list_rows' => $limit])
            ->toArray();
    }

    //新增
    public function add($params)
    {
        return $this->model->createInfo($params);
    }
}